//
//  RMMGoodsZhanOrChaiTableViewCell.m
//  Romomo
//
//  Created by puman on 2016/10/26.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMGoodsZhanOrChaiTableViewCell.h"

@implementation RMMGoodsZhanOrChaiTableViewCell
{
    UILabel *_label;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _label = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, kScreenWideth - 15 - 98, 49)];
        _label.numberOfLines = 0;
        _label.textColor = COLORFROMCODE(0x2C2C2C, 1);
        _label.font = kFont(14);
        [self.contentView addSubview:_label];
        
        for (int i = 0; i < 2; i++) {
            UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
            button.frame = CGRectMake(kScreenWideth - 98 + 49 * i, 0, 49, 49);
            [self.contentView addSubview:button];
            if (i == 0) {
                [button setImage:[UIImage imageNamed:@"踩@3x"] forState:(UIControlStateNormal)];
                _badBut = button;
            } else {
                [button setImage:[UIImage imageNamed:@"已推荐@3x"] forState:(UIControlStateNormal)];
                _goodBut = button;
 
            }
        }
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWideth, 0.5)];
        view.backgroundColor = COLORFROMCODE(0xEEEEEE, 1);
        [self.contentView addSubview:view];
    }
    return self;
}
- (void)setDic:(NSDictionary *)dic{
    _label.text = [RMMFileManager retrunObjWith:dic[@"PROD_NAME"]];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
